<!DOCTYPE html>
<html class=reftest-wait>
<link rel=author href="mailto:jarhar@chromium.org">
<link rel=help href="https://github.com/whatwg/html/issues/9799">
<link rel=match href="select-open-invalidation-ref.html">

<style>
select > button {
  color: red;
}
select:open > button {
  color: green;
}
</style>

<select style="appearance:base-select">
  <button>button</button>
  <datalist>
    <option>one</option>
    <option>two</option>
  </datalist>
</select>

<script>
(async () => {
  await new Promise(requestAnimationFrame);
  try {
    document.querySelector('datalist').showPopover();
  } catch (error) {}
  await new Promise(requestAnimationFrame);
  document.documentElement.classList.remove('reftest-wait');
})();
</script>
